<%@ page import="com.bafa.objects.season.Season" %>
<%@ page import="com.bafa.objects.season.Division" %>
<%@ page import="com.bafa.objects.team.Team" %>
<%@ page import="com.bafa.objects.team.TeamSeasonStats" %>
<%@ page import="com.bafa.objects.team.TeamStats" %>
<%@ page import="com.bafa.objects.player.*" %>
<%@ page import="com.bafa.objects.*" %>
<%@ page import="com.bafa.middle.*" %>
<%@ page import="com.bafa.front.presentationbeans.*" %>
<%@ page import="java.util.*" %>
<% LeagueBean division = (LeagueBean)request.getAttribute("DIVISION");%>
 
<link type="text/css" media="screen" rel="stylesheet" href="style.css" />
<script  src="script/niftycube.js" type="text/javascript" ></script>
	<script>
	NiftyLoad=function(){

		Nifty("ul#teamstandings h3","top");
		Nifty("ul#teamstandings div","bottom same-height");
		Nifty("ul#recentresults h3","top");
		Nifty("ul#recentresults div","bottom same-height");
		Nifty("ul#topscorer h3","top");
		Nifty("ul#topscorer div","bottom same-height");
		



}


</script>
<style type="text/css">
	
	
	
	ul#teamstandings,ul#teamstandings li{margin:0;padding:0;list-style:none}
	ul#teamstandings li{float:left;width:252px;margin:0 10px 10px 0}
	ul#teamstandings h3{font: bold  Verdana,sans-serif;
	    text-transform:uppercase;margin:0px;padding: 5px 0 3px;text-align:center}
	ul#teamstandings p{margin:0;padding:5px 8px 15px}
	ul#teamstandings div{background:#FFFFFF}
	li#teamstandings div{border:2px solid #D2D2D2}
	
	
	
	
	
	
	
</style>


<ul style="align:right" id="teamstandings">

 		<li id="teamstandings"><h3 class="avlh">Latest Team Standings -- Division <%=division.getDivisionId()%></h3>
    
    <div>
      
      <table  border="0" class="bafatablesmall">
        <tr>
          <td width="176">Name</td>
          <td width="26">P</td>
          <td width="25">GD</td>
          <td width="27">Pts</td>
          
        </tr>
		<%for(int i=0;i<division.teams().length;i++){
			LeaguePositionBean team = division.teams()[i];


		%>


			
		
        
         <%if(team!=null){%>
        <tr class="r2">
          <td><A href="team.bafa?TeamId=<%=team.getId()%>&SeasonId=<%=division.getSeasonId()%>"><b><%=team.getName()%></b></A></td>
          <td><%=team.getGamesPlayed()%></td>
          
          <td><%=team.getGoalDifference()%></td>
         <td><%=team.getPoints()%></td>
          
        </tr><%}%>
		<%i++; %>

		<%if(i<division.teams().length){team = division.teams()[i];%>

        <tr class="r1">
          <td><A href="team.bafa?TeamId=<%=team.getId()%>&SeasonId=<%=division.getSeasonId()%>"><b><%=team.getName()%></b></A></td>
          <td><%=team.getGamesPlayed()%></td>
	  <td><%=team.getGoalDifference()%></td>
         <td><%=team.getPoints()%></td>
        
        </tr>
		<%}}%>
	
      </table>
	
	  
    </div>
    </li>
    </ul>